<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img{
            width: 300px;
            height: 200px;
            
            border: 2px solid #000;
            background-color: khaki;
            /* 
            contain 等比缩放到正好全部填充到当前容器
            cover 等比缩放到正好填满整个容器
            fill 拉伸图片填满整个容器
            none 保持图片原始尺寸显示
            scale-down 图片等比缩放到小于等于容器尺寸的最大尺寸

            */
            object-fit: contain;
            object-fit: cover;
            object-fit: fill;
            object-fit: none;
            object-fit: scale-down;
        }
    </style>
</head>
<body>
    <img src="./assets/kele.jpg" alt="">
</body>
</html>